package com.hundsun.cprs.yyt.web.vo.excel;

import java.util.Date;

import com.hundsun.cprs.yyt.service.trade.dto.TradeMatchDetailInfo;
import com.hundsun.cprs.yyt.service.trade.enums.EnumEntustBSType;
import com.hundsun.cprs.yyt.util.MoneyUtils;

public class TradeMatchDetailVo {
    
    private String sn;
    private String fundAccount;
    private String goodsCode;
    private String goodsName;
    private String entrustBs;
    private Long entrustAmount;
    private String entrustPrice;
    private Long matchAmount;
    private String matchPrice;
    private Date gmtCreate;

    
    public TradeMatchDetailVo(TradeMatchDetailInfo detail){
        this.sn = detail.getSn();
        this.fundAccount = detail.getEntrust().getFundAccount();
        this.goodsCode  = detail.getEntrust().getGoodsCode();
        this.goodsName = detail.getGoodsName();
        if (EnumEntustBSType.BUY.getCode().toString().equals(detail.getEntrust().getEntrustBs())) {
            this.entrustBs = "买入";
        } else {
            this.entrustBs = "卖出";
        }
        this.entrustAmount = detail.getEntrust().getEntrustAmount();
        this.entrustPrice = MoneyUtils.getMoneyFormatFen(detail.getEntrust().getEntrustPrice());
        this.matchAmount = detail.getMatchAmount();
        this.matchPrice = MoneyUtils.getMoneyFormatFen(detail.getMatchPrice());
        this.gmtCreate = detail.getGmtCreate();
    }


    public String getSn() {
        return sn;
    }


    public void setSn(String sn) {
        this.sn = sn;
    }


    public String getFundAccount() {
        return fundAccount;
    }


    public void setFundAccount(String fundAccount) {
        this.fundAccount = fundAccount;
    }


    public String getGoodsCode() {
        return goodsCode;
    }


    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }


    public String getGoodsName() {
        return goodsName;
    }


    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }


    public String getEntrustBs() {
        return entrustBs;
    }


    public void setEntrustBs(String entrustBs) {
        this.entrustBs = entrustBs;
    }


    public Long getEntrustAmount() {
        return entrustAmount;
    }


    public void setEntrustAmount(Long entrustAmount) {
        this.entrustAmount = entrustAmount;
    }


    public String getEntrustPrice() {
        return entrustPrice;
    }


    public void setEntrustPrice(String entrustPrice) {
        this.entrustPrice = entrustPrice;
    }


    public Long getMatchAmount() {
        return matchAmount;
    }


    public void setMatchAmount(Long matchAmount) {
        this.matchAmount = matchAmount;
    }


    public String getMatchPrice() {
        return matchPrice;
    }


    public void setMatchPrice(String matchPrice) {
        this.matchPrice = matchPrice;
    }


    public Date getGmtCreate() {
        return gmtCreate;
    }


    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }
}
